Skip to content

vm: fix copying PropertyDescriptor#64073

Open
legendecas wants to merge 1 commit into
nodejs:mainfrom
legendecas:vm-define
Open

vm: fix copying PropertyDescriptor#64073
legendecas wants to merge 1 commit into
nodejs:mainfrom
legendecas:vm-define

Conversation

@legendecas

@legendecas legendecas commented Jun 22, 2026

Copy link
Copy Markdown
Member

This fixes a long-standing issue that
ContextifyContext::PropertyDefinerCallback incorrectly copies the
const PropertyDescriptor& desc, assigning value to be undefined when
no value present on the PropertyDescriptor.

This is revealed after #63549 because
returning kYes tells V8 that the definer handled it, and V8 no longer
fixes it up.

Fixes: #64008

/cc @nodejs/vm

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. needs-ci PRs that need a full CI run. vm Issues and PRs related to the vm subsystem. labels Jun 22, 2026
@legendecas legendecas changed the title src: fix copying PropertyDescriptor vm: fix copying PropertyDescriptor Jun 22, 2026
This fixes a long-standing issue that
`ContextifyContext::PropertyDefinerCallback` incorrectly copies the
`const PropertyDescriptor& desc`, assigning value to be `undefined` when
no value present on the `PropertyDescriptor`.

This is revealed after nodejs#63549 because
returning `kYes` tells V8 that the definer handled it, and V8 no longer
fixes it up.

Signed-off-by: Chengzhong Wu <cwu631@bloomberg.net>
@geeksilva97 geeksilva97 added request-ci Add this label to start a Jenkins CI on a PR. needs-ci PRs that need a full CI run. and removed needs-ci PRs that need a full CI run. labels Jun 24, 2026
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jun 24, 2026
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@geeksilva97 geeksilva97 added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. commit-queue Add this label to land a pull request using GitHub Actions. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. and removed needs-ci PRs that need a full CI run. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. labels Jun 25, 2026
@nodejs-github-bot nodejs-github-bot added commit-queue-failed An error occurred while landing this pull request using GitHub Actions. and removed commit-queue Add this label to land a pull request using GitHub Actions. labels Jun 25, 2026
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator
Commit Queue failed
- Loading data for nodejs/node/pull/64073
βœ”  Done loading data for nodejs/node/pull/64073
----------------------------------- PR info ------------------------------------
Title      vm: fix copying PropertyDescriptor (#64073)
   ⚠  Could not retrieve the email or name of the PR author's from user's GitHub profile!
Branch     legendecas:vm-define -> nodejs:main
Labels     c++, vm, author ready
Commits    1
 - vm: fix copying PropertyDescriptor
Committers 1
 - Chengzhong Wu <cwu631@bloomberg.net>
PR-URL: https://github.com/nodejs/node/pull/64073
Fixes: https://github.com/nodejs/node/issues/64008
Reviewed-By: Edy Silva <edigleyssonsilva@gmail.com>
------------------------------ Generated metadata ------------------------------
PR-URL: https://github.com/nodejs/node/pull/64073
Fixes: https://github.com/nodejs/node/issues/64008
Reviewed-By: Edy Silva <edigleyssonsilva@gmail.com>
--------------------------------------------------------------------------------
   β„Ή  This PR was created on Mon, 22 Jun 2026 18:54:27 GMT
   βœ”  Approvals: 1
   βœ”  - Edy Silva (@geeksilva97): https://github.com/nodejs/node/pull/64073#pullrequestreview-4563572633
   ✘  This PR needs to wait 97 more hours to land (or 0 minutes if there is one more approval)
   βœ”  Last GitHub CI successful
   β„Ή  Last Full PR CI on 2026-06-25T13:19:37Z: https://ci.nodejs.org/job/node-test-pull-request/74414/
- Querying data for job/node-test-pull-request/74414/
βœ”  Build data downloaded
   βœ”  Last Jenkins CI successful
--------------------------------------------------------------------------------
   βœ”  Aborted `git node land` session in /home/runner/work/node/node/.ncu
https://github.com/nodejs/node/actions/runs/28189584946

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs that have at least one approval, no pending requests for changes, and a CI started. c++ Issues and PRs that require attention from people who are familiar with C++. commit-queue-failed An error occurred while landing this pull request using GitHub Actions. vm Issues and PRs related to the vm subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

vm: Object.defineProperty doesn't work properly for globalThis

3 participants